//
//  TestViewController.m
//  ZSHUDManager
//
//  Created by 字节科技 on 2018/12/22.
//  Copyright © 2018 Byte. All rights reserved.
//

#import "TestViewController.h"
#import "RunLabel.h"

@interface TestViewController ()

@end

@implementation TestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    RunLabel *runL = [[RunLabel alloc]initWithFrame:CGRectMake(0, 0, 150, 48)];
    runL.center = self.view.center;
    [self.view addSubview:runL];
    __weak typeof(runL) WeakL = runL;
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [WeakL changeText:@"不行" State:RunLabelStateError];
    });
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [WeakL changeText:@"哈哈哈哈哈哈哈少时诵诗书不行" State:RunLabelStateNormal];
    });
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(8 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [WeakL changeText:@"警告信息，此处不可降落，请注意" State:RunLabelStateWarning];
    });
   
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
